<h4><i class="fa fa-stack-overflow"></i> <?php echo Yii::t('helpdesk','Documents'); ?></h4><hr>
<?php $this->renderPartial('/site/documents/search', array('keyword' => isset($keyword)?$keyword:null));?>
<div class="content col-md-3">
    <?php $this->renderPartial('/site/documents/sidebar', array('arrFolders' => $arrFolders, 'cateId' => $cateId, 'latest_laws' => $latest_laws));?>
    <div class="main-panel col-md-9">
    	<?php $this->renderPartial('/site/documents/breadcrumb', array('cate' => $cate, 'keyword' => $keyword, 'post' => $post, 'latest_laws' => $latest_laws));?>
		<?php if(!empty($arrDocuments)): ?>
        <div class="list">
        	<?php foreach($arrDocuments as $R): ?>
            <div class="item">
            	<?php 
					$postCateId = '';
					if(!empty($cateId)) $postCateId = $cateId;
					else{
						if(!empty($R['post_category'][0])) $postCateId = $R['post_category'][0]['category_id'];
						else $postCateId = 0;
					}
				?>
            	<a href="/documents/<?php echo $postCateId; ?>/<?php echo Utils::uri_encode($R['post_title']); ?>.<?php echo $R['post_id']; ?>.html">
					<i class="fa fa-file-o" style="color:#5C5C5C"></i> <b><?php echo $R['post_title']; ?></b> <span class="desc">(<?php echo date('d/m/Y', strtotime($R['post_created_date'])); ?>)</span>
                    <?php if(isset($R['post_created_date']) && mktime()-strtotime($R['post_created_date']) <= 60*60*24*3):?>
                    <img src="./img/new.gif">
                    <?php endif; ?>
                </a>
            </div>
            <?php endforeach; ?>
        </div>
        <div>
        	<?php $this->widget('Pagination', array(
				'pages' => $objPages,
			)) ?>
        </div>
        <?php else: ?>
        <div class="list">
        	<?php echo Yii::t('helpdesk','No data found'); ?>
        </div>
        <?php endif; ?>
    </div>
</div>